import type { CustomerServiceListItem } from '@/types/api'

interface FetchCustomerServiceListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: CustomerServiceListItem[]
    current_page: number
    total: number
    per_page: string
    last_page: string
  }
}

interface FetchCustomerServiceListAPIParams {
  page: string
  limit: string
}

export function fetchCustomerServiceListAPI(params: FetchCustomerServiceListAPIParams, token: string) {
  return httpInstance.get<FetchCustomerServiceListAPIResData, FetchCustomerServiceListAPIParams>(
    '/api/notice/helpcenterlist',
    { params, headers: { token } },
  )
}
